package com.ly.honor.entity.dto;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author 李某人
 * @Date 2023/2/21 0:46
 * @Version 1.0
 */
@Data
public class ClueCreateDTO {

    /**
     * 俱乐部图片链接
     */
    private String photo;

    @NotBlank(message = "俱乐部名称不能为空")
    private String name;

    @NotNull(message = "所在地不能为空")
    private Integer countryId;

    @NotBlank(message = "BOSS不能为空")
    private String boss;

    @NotNull(message = "建立时间不能为空")
    private Date buildTime;


    public void setBuildTime(String buildTime) {
        DateTime dt = DateUtil.parse(buildTime);
        this.buildTime = dt;
    }
}
